import { IFeidaoAiMobile } from '@dfeidao/atom-mobile/interfaces';
import get from '@dfeidao/atom-mobile/local/get';
import set from '@dfeidao/atom-mobile/local/set';
import render from '@dfeidao/atom-mobile/render/render';
export default async function a002(fd: IFeidaoAiMobile, e: Event, ...args: [string]) {
	// set(fd, 'leave_content', args);
	if (typeof e === 'string') {
		set(fd, 'leave_content', e);
	}
	if (args[0] === 'blur') {
		if (!get(fd, 'leave_content')) {
			// 意见为空 改变按钮的颜色 1:为空  2:不为空
			render(fd, { btns: '1' });
		} else if (get(fd, 'leave_content')) {
			render(fd, { btns: '2' });
		}
	}
	if (args[0] === 'changeText') {
		if (!get(fd, 'leave_content')) {
			// 意见为空 改变按钮的颜色 1:为空  2:不为空
			render(fd, { btns: '1' });
		} else if (get(fd, 'leave_content')) {
			render(fd, { btns: '2' });
		}
	}
}
